/**
 * This software was produced for the U. S. Government
 * under Contract No. FA8721-09-C-0002, and is
 * subject to the Rights in Noncommercial Computer Software
 * and Noncommercial Computer Software Documentation Clause
 * (DFARS) 252.227-7014 (JUN 1995)
 * 
 * (c) 2009 The MITRE Corporation. All Rights Reserved.
 *
 * SPMIF to OPNET Translator
 * Author: ewalters
 * Created: 1:18:56 PM, Aug 13, 2007
 * MITRE Corporation
 */
package com.mitre.spmif2opnet.generation;


/**
 * Interface for generating a graph, in case we want to target something other than
 *  OPNET for simulation.
 */
public interface GraphConverter {
	
	/**
	 * Generate a processing node (if necessary) with a loop task
	 * @param c context
	 * @param p loop name
	 * @return context
	 * @throws GenerationException
	 */
	public GenerationContext genProcessingLoop(GenerationContext c, String p) 
		throws GenerationException;
	
	/**
	 * Generate a network task between two specified endpoints
	 * @param c context
	 * @param start endpoint
	 * @param end endpoint
	 * @return context
	 * @throws GenerationException
	 */
	public GenerationContext genNetworking(GenerationContext c, String start, String end)
		throws GenerationException;

	/**
	 * Generate a task between a fixed endpoint and a "future" endpoint
	 * @param c context
	 * @param start endpoint
	 * @return context
	 * @throws GenerationException
	 */
	public GenerationContext genNetworkingStart(GenerationContext c, String start)
		throws GenerationException;

	/**
	 * Generate a task entirely in the network
	 * @param c context
	 * @return context
	 * @throws GenerationException
	 */
	public GenerationContext genNetworkingMiddle(GenerationContext c)
		throws GenerationException;

	/**
	 * Generate a task between the "future" endpoint and a real one
	 * @param c context
	 * @param end endpoint 
	 * @return context
	 * @throws GenerationException
	 */
	public GenerationContext genNetworkingEnd(GenerationContext c, String end)
		throws GenerationException;

	/**
	 * Generate an Endpoint from pre-existing resource specs
	 * @param c context
	 * @return the resource
	 */
	public String getResource(GenerationContext c)
		throws GenerationException;

	/**
	 * Make a new Endpoint 
	 * @param c context
	 * @return the endpoint resource
	 * @throws GenerationException
	 */
	public String makeResource(GenerationContext c)
		throws GenerationException;
}
